<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><!DOCTYPE HTML>
<html lang="en-US">
<head>
	<meta charset="UTF-8">
	<base target="content"/>
	<title>商品属性管理</title>
	<script type='text/javascript' src='http://127.0.0.1/teacherShop/hdphp/hdphp/Extend/Org/Jquery/jquery-1.8.2.min.js'></script>
<link href='http://127.0.0.1/teacherShop/hdphp/hdphp/../hdjs/css/hdjs.css' rel='stylesheet' media='screen'>
<script src='http://127.0.0.1/teacherShop/hdphp/hdphp/../hdjs/js/hdjs.js'></script>
<script src='http://127.0.0.1/teacherShop/hdphp/hdphp/../hdjs/js/slide.js'></script>
<script src='http://127.0.0.1/teacherShop/hdphp/hdphp/../hdjs/org/cal/lhgcalendar.min.js'></script>
<script type='text/javascript'>
		HOST = 'http://127.0.0.1';
		ROOT = 'http://127.0.0.1/teacherShop';
		WEB = 'http://127.0.0.1/teacherShop/index.php';
		URL = 'http://127.0.0.1/teacherShop/index.php/Admin/Category/index';
		HDPHP = 'http://127.0.0.1/teacherShop/hdphp/hdphp';
		HDPHPDATA = 'http://127.0.0.1/teacherShop/hdphp/hdphp/Data';
		HDPHPTPL = 'http://127.0.0.1/teacherShop/hdphp/hdphp/Lib/Tpl';
		HDPHPEXTEND = 'http://127.0.0.1/teacherShop/hdphp/hdphp/Extend';
		APP = 'http://127.0.0.1/teacherShop/index.php/Admin';
		CONTROL = 'http://127.0.0.1/teacherShop/index.php/Admin/Category';
		METH = 'http://127.0.0.1/teacherShop/index.php/Admin/Category/index';
		GROUP = 'http://127.0.0.1/teacherShop/my';
		TPL = 'http://127.0.0.1/teacherShop/my/myshop/Admin/Tpl';
		CONTROLTPL = 'http://127.0.0.1/teacherShop/my/myshop/Admin/Tpl/Category';
		STATIC = 'http://127.0.0.1/teacherShop/Static';
		PUBLIC = 'http://127.0.0.1/teacherShop/my/myshop/Admin/Tpl/Public';
		HISTORY = 'http://127.0.0.1/teacherShop/index.php/Admin';
		HTTPREFERER = 'http://127.0.0.1/teacherShop/index.php/Admin';
</script>
</head>
<body>
	<div class="menu_list">
		<ul>
			<li><a href="<?php echo U('index');?>" class="action">栏目列表</a></li>
			<li><a href="<?php echo U('add');?>">添加栏目</a></li>
			<li><a href="<?php echo U('updateCache');?>">更新栏目缓存</a></li>
		</ul>
	</div>
	<div class="title-header">栏目列表 </div>
	<form action="" method="post">
		<table class="table1 hd-form">
			<thead>
				<tr>
					<td class="w100">CID</td>
					<td >栏目名称</td>
					<td class="w200">操作</td>
				</tr>
			</thead>
			<?php $hd["list"]["d"]["total"]=0;if(isset($data) && !empty($data)):$_id_d=0;$_index_d=0;$lastd=min(1000,count($data));
$hd["list"]["d"]["first"]=true;
$hd["list"]["d"]["last"]=false;
$_total_d=ceil($lastd/1);$hd["list"]["d"]["total"]=$_total_d;
$_data_d = array_slice($data,0,$lastd);
if(count($_data_d)==0):echo "";
else:
foreach($_data_d as $key=>$d):
if(($_id_d)%1==0):$_id_d++;else:$_id_d++;continue;endif;
$hd["list"]["d"]["index"]=++$_index_d;
if($_index_d>=$_total_d):$hd["list"]["d"]["last"]=true;endif;?>

				<tr>
					<td><?php echo $d['cid'];?></td>
					<td><?php echo $d['_name'];?></td>
					<td>
						<a href="<?php echo U('save',array('cid'=>$d['cid'],'pid'=>$d['pid']));?>">修改</a> | 
						<a href="<?php echo U('del',array('cid'=>$d['cid']));?>">删除</a> |
						<a href="<?php echo U('add',array('pid'=>$d['cid']));?>">添加子级栏目</a> 
					</td>
				</tr>
			<?php $hd["list"]["d"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>
		</table>
	
	</form>
</body>
</html>